package cn.wolfcode.crm.web.controller;


import cn.wolfcode.crm.page.PageResult;
import cn.wolfcode.crm.query.SalaryQueryObject;
import cn.wolfcode.crm.service.ISalaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("salary")
public class SalaryController {

    @Autowired
    private ISalaryService salaryService;


    @RequestMapping("")
    public String index() {

        return "salary";
    }

    @RequestMapping("list")
    @ResponseBody
    public PageResult list(SalaryQueryObject qo) {

        PageResult pageResult = salaryService.query(qo);
        return  pageResult;
    }
}